package tech.aistar.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author: lya
 * @Description: 本类的作用描述:
 * @CreateDate: 2019/9/6
 * @Version: 1.0
 */
@WebServlet(urlPatterns = "/user/loginOut")
public class LoginOutAction extends HttpServlet{
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        //清空session
        req.getSession().invalidate();

        resp.sendRedirect(req.getContextPath()+"/nav/loginview");
    }
}
